package com.learner.pojo.course;

import lombok.Data;
import lombok.ToString;
import org.hibernate.annotations.GenericGenerator;
import org.springframework.data.annotation.CreatedDate;

import javax.persistence.*;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

@Data
@ToString
@Entity
@Table(name="course_pub")
public class CoursePub implements Serializable {
    private static final long serialVersionUID = 7108086352061037004L;
    @Id
    @Column(length = 32)
    private String id;
    private String name;
    @Column(name = "userid")
    private String userId;
    private String users;
    private String mt;
    private String st;

    private String grade;
    private String description;

    private Date timestamp;//时间戳
    private String charge;
    private String valid;
    private String pic;//图片
    private BigDecimal price;
    private BigDecimal price_old;
    private Date expires;

    @Column(name="courseplan")
    private String coursePlan;//课程计划

    @CreatedDate
    @Column(name="pub_time")
    private String pubTime;//课程发布时间
    private  String  ap;
    @Column(name = "teacher_name")
    private String teacherName;

    // 销售数量   "format" : "yyyy-MM-dd HH:mm:ss",
    @Column(name = "buy_count")
    private Long buyCount;
    // 销售数量
    @Column(name = "view_count")
    private Long viewCount;

    @Column(name = "start_time")
    private Date startTime;
    @Column(name = "end_time")
    private Date endTime;
}
